package ams.dao;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

public interface IBaseDao<T> {
	
	public T get(Class<T> c,Serializable id);

	public void save(T o);

	public void delete(T o);

	public void update(T o);

	public void saveOrUpdate(T o);
	

	public T get(String hql);

	public T get(String hql, Object[] paramArray);

	public T get(String hql, List<Object> paramList);
	

	public List<T> Find(String hql);
	
	public List<T> Find(String hql, Integer page, Integer rows);

	public List<T> Find(String hql, Object[] paramArray);

	public List<T> Find(String hql, Object[] paramArray, Integer page, Integer rows);

	public List<T> Find(String hql, List<Object> paramList);

	public List<T> Find(String hql, List<Object> paramList, Integer page, Integer rows);
	
	public List<T> Find(String hql, Map<String,Object> paramMap);
	
	

	public Long count(String hql);

	public Long count(String hql, Object[] paramArray);

	public Long count(String hql, List<Object> paramList);
	
	public Long count(String hql, Map<String,Object> paramMap);
	

	public Integer executeHql(String hql);

	public Integer executeHql(String hql, Object[] paramArray);

	public Integer executeHql(String hql, List<Object> paramList);
	
	public Integer executeHql(String hql, Map<String,Object> paramMap);
	
	
	
	@SuppressWarnings("rawtypes")
	public List<T> findBySQL(String sql,Class T);
	
	@SuppressWarnings("rawtypes")
	public List<T> findBySQL(String sql,Class T, Object[] paramArray);
	
	public void executeBySQL(String sql);


}
